﻿using Little.Soldier.SWIFT;
using Little.Soldier.SWIFT.Definition;
using System.ComponentModel;

namespace Little.Soldier.SWIFT.Messages.Category0
{
  public class MT031 : SwiftMessage
  {
    private static SwiftMessageDefinition MessageDefinition;
    private static SwiftTagDefinition U0002;
    private static SwiftTagSubItemDefinition U0003;
    private static SwiftTagDefinition U0004;
    private static SwiftTagSubItemDefinition U0005;
    private static SwiftTagSubItemDefinition U0006;
    private static SwiftTagDefinition U0007;
    private static SwiftTagSubItemDefinition U0008;
    private static SwiftTagSubItemDefinition U000E;

    [Description("9th character of BIC-12. ")]
    public Tag303 LTCode_303
    {
      get
      {
        return new Tag303((SwiftElement) this, 0, (SwiftDefinitionElement) MT031.U0002);
      }
    }

    [Description("9th character of BIC-12. ")]
    public Tag303 Tag303_LTCode
    {
      get
      {
        return this.LTCode_303;
      }
    }

    [Description("Start date and time")]
    public Tag177 StartDateTime_177
    {
      get
      {
        return new Tag177((SwiftElement) this, 0, (SwiftDefinitionElement) MT031.U0004);
      }
    }

    [Description("Start date and time")]
    public Tag177 Tag177_StartDateTime
    {
      get
      {
        return this.StartDateTime_177;
      }
    }

    [Description("End Date and Time")]
    public Tag177 EndDateTime_177
    {
      get
      {
        return new Tag177((SwiftElement) this, 0, (SwiftDefinitionElement) MT031.U0007);
      }
    }

    [Description("End Date and Time")]
    public Tag177 Tag177_EndDateTime
    {
      get
      {
        return this.EndDateTime_177;
      }
    }

    public MT031()
      : base(true)
    {
    }

    public MT031(SwiftMessage message)
      : base(message)
    {
    }

    internal override SwiftMessageDefinition MsgDefinition()
    {
      return MT031.MessageDefinition;
    }

    protected override void InitSwiftMessageDefinition()
    {
      MT031.MessageDefinition = new SwiftMessageDefinition("MT031", "Session History Request");
      MT031.U0002 = new SwiftTagDefinition("LTCode_303", "9th character of BIC-12. ");
      MT031.U0002.TagName = "{303:";
      MT031.U0003 = new SwiftTagSubItemDefinition("LTCode", "9th character of BIC-12. ");
      MT031.U0002.Elements.Add((SwiftDefinitionElement) MT031.U0003);
      MT031.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT031.U0002);
      MT031.U0004 = new SwiftTagDefinition("StartDateTime_177", "Start date and time");
      MT031.U0004.TagName = "{177:";
      MT031.U0005 = new SwiftTagSubItemDefinition("Date", "Date");
      MT031.U0004.Elements.Add((SwiftDefinitionElement) MT031.U0005);
      MT031.U0006 = new SwiftTagSubItemDefinition("Time", "Time");
      MT031.U0004.Elements.Add((SwiftDefinitionElement) MT031.U0006);
      MT031.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT031.U0004);
      MT031.U0007 = new SwiftTagDefinition("EndDateTime_177", "End Date and Time");
      MT031.U0007.TagName = "{177:";
      MT031.U0008 = new SwiftTagSubItemDefinition("Date", "Date");
      MT031.U0007.Elements.Add((SwiftDefinitionElement) MT031.U0008);
      MT031.U000E = new SwiftTagSubItemDefinition("Time", "Time");
      MT031.U0007.Elements.Add((SwiftDefinitionElement) MT031.U000E);
      MT031.MessageDefinition.Elements.Add((SwiftDefinitionElement) MT031.U0007);
    }
  }
}
